﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_channelDo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!Page.IsPostBack)
        {
            channelDo();
        }
    }
    //处理
    public void channelDo() { 
        
        string buttons = Request["but"].ToString();
        string channelid=Request["channelid"].ToString();
        string cname=Request["leiName"].ToString();
        string order=Request["order"].ToString();
        string url=Request["url"].ToString().Replace("^wenhao^","?").Replace("^he^","&");
        string img=Request["img"].ToString();
        string isshow=Request["isshow"].ToString();
        string pageLocation=Request["pageLocation"].ToString();

        if ("add".Equals(buttons)) {
            ChannelDao.add(cname, channelid, order, url,isshow, img, pageLocation);
        }
        else if ("update".Equals(buttons)) {
            ChannelDao.update(channelid, cname, order, url, isshow, img, pageLocation);
        }
        else if ("del".Equals(buttons)) {
            ChannelDao.del(channelid);
        }
        Response.Write("<script>alert('处理成功');location.href='channel.aspx';</script>");
    }
}
